import request from './request'

// 查询日志
export const queryLogs = (data) => {
  return request({
    url: '/log/query',
    method: 'post',
    data
  })
}

// 获取日志详情
export const getLogDetail = (id) => {
  return request({
    url: `/log/${id}`,
    method: 'get'
  })
}

// 统计日志
export const statLogs = (params) => {
  return request({
    url: '/log/stat',
    method: 'get',
    params
  })
}

// 导出日志
export const exportLogs = (data) => {
  return request({
    url: '/log/export',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 删除日志
export const deleteLog = (id) => {
  return request({
    url: `/log/${id}`,
    method: 'delete'
  })
}

